package com.zrf.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zrf.dao.impl.PersonDaoImpl;
import com.zrf.pojo.Person;

@Service("personService")
public class PersonService {

	@Autowired
	private PersonDaoImpl pdi = null;
	public boolean login(String name, String pwd) {
		boolean is = false;
		Person p = new Person();
		p.setPname(name);
		p.setPpassword(pwd);
		p = pdi.findForObject(p);
		if (p!=null&&(!p.getPname().equals(""))&&p.getPname()!=null) {
			is = true;
		}
		return is;
	}
}
